<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org/">
<head>
	<meta charset="UTF-8">
	<link rel="shortcut icon" th:href="@{/fav.ico}">
	<link rel="stylesheet" th:href="@{/css/iconfont.css}">
	<link rel="stylesheet" th:href="@{/css/global.css}">
	<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
	<link rel="stylesheet" th:href="@{/css/bootstrap-theme.min.css}">
	<link rel="stylesheet" th:href="@{/css/swiper.min.css}">
	<link rel="stylesheet" th:href="@{/css/styles.css}">
	<script th:src="@{/js/jquery.1.12.4.min.js}" charset="UTF-8"></script>
	<script th:src="@{/js/bootstrap.min.js}" charset="UTF-8"></script>
	<script th:src="@{/js/swiper.min.js}" charset="UTF-8"></script>
	<script th:src="@{/js/global.js}" charset="UTF-8"></script>
	<script th:src="@{/js/jquery.DJMask.2.1.1.js}" charset="UTF-8"></script>
	<title>用户中心</title>
</head>
<body>
	<!-- 顶部tab -->
	<div th:replace="fragments/common::top-tab"></div>
	<!-- 顶部标题 -->
	<div class="bgf5 clearfix">
		<div class="top-user">
			<div class="inner">
				<a class="logo" th:href="@{/}"><img th:src="@{/images/icons/whlogo.png}" alt="旺和" class="cover"></a>
				<div class="title">个人中心</div>
			</div>
		</div>
	</div>
	<div class="content clearfix bgf5">
		<section class="user-center inner clearfix">
			<div class="pull-left bgf">
				<a  class="title">个人中心</a>
				<dl class="user-center__nav">
					<a class="site-active link"  th:data-url="|@{/user/getUserDataPage}|"><dd class="active">个人资料</dd></a>
					<a class="site-active link"  th:data-url="|@{/user/getUserAddressPage}|"><dd>收货地址</dd></a>
					<a class="site-active link"  th:data-url="|@{/user/getUserPwdModifyPage}|"><dd>修改登录密码</dd></a>
				</dl>
			</div>
			<div class="pull-right">
				<iframe name="iframe" id="iframeId" th:src="@{/user/getUserDataPage}"   onload="adjustIframe();" width="100%" style="border-width: 0px" scrolling="no"></iframe>
			</div>
		</section>
	</div>
	<!-- 右侧菜单 -->
	<div th:replace="fragments/common::right-menu"></div>
	<!-- 底部信息 -->
	<div th:replace="fragments/common::bottom-bar"></div>
</body>
<script th:inline="javascript">
	$('.site-active').click(function() {
		window.open($(this).data('url'), "iframe");
	});
	function adjustIframe(){
		// var ifm= document.getElementById("iframeId");
		// ifm.height=document.documentElement.clientHeight;
		var ifm= document.getElementById("iframeId");
		let aWindow = ifm.contentWindow;
		ifm.height=aWindow .document.body.scrollHeight;
	}
	$('.site-active').click(function (){
		$(this).siblings().each(function() {
			$(this).removeClass('active');
			var dd=$(this).find('dd')
			dd.removeClass('active');
		});
		$(this).addClass('active');
		var thisdd=$(this).find('dd');
		thisdd.addClass('active');
	})

	$('.link').css("cursor", "pointer");
</script>
</html>